package com.wtzz.police.base.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.collections4.KeyValue;
import org.springframework.data.annotation.CreatedDate;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

@ApiModel("操作日志")
@Data
@Entity
@Table(name = "operation_log")
public class OperationLog  implements Serializable {

    private static final long serialVersionUID = 8242516185862661957L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;
    private String operation;
    private String url;
    private String ip;
    private String username;
    private String userId;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @CreatedDate
    @Column(columnDefinition = "datetime(3)")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createdDate = new Date();

}
